package edu.upf.grupoe.p2ppicture.SearchEngine.implementations;
import edu.upf.grupoe.p2ppicture.SearchEngine.interfaces.SearchResult;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class SearchResultImpl implements SearchResult, Serializable{

    public List<ContentImpl> contents = new ArrayList<ContentImpl> ();
    /**
     * This method returns a list of contents
     * @return List<ContentImpl>
     */
    public List<ContentImpl> getContents(){
        return this.contents;
    }
    /**
     * This method sers a list of contents
     * @param contents List<ContentImpl>
     */
    public void setContents(List<ContentImpl> contents) {
        this.contents = contents;
    }
    /**
     * This method adss a content to an existing content list
     * @param content ContentImpl
     */
    public void addContent(ContentImpl content) {
        this.contents.add(content);
    }
    /**
     * SearchResult Constructor
     * @param contents
     */
    public SearchResultImpl(List<ContentImpl> contents){
        this.contents = contents;
    }
}
